<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="icon" href="../../img/logoimg.png" type="image/ico">
</head>
<div th:include="common/style"></div>
<style>
    small{
        font-size: 10px;
        color: grey;
    }
    ul{
        width: 300px;
        height: 200px;
        float: left;
    }
    ul a{
        float: left;
        padding-bottom: 1%;
    }
</style>
<body style="background: #f7f1e3;">
<script type="text/javascript" src="../../js/jquery-3.6.0.min.js"></script>
<div class="shang">
    <div>
        <table style="width: 500px;text-align: center;">
            <tr>
                <td>作品数量</td>
                <td>累计字数</td>
            </tr>
            <tr >
                <td align="center">
                    <span th:text="${scount}"></span>本
                </td>
                <td align="center">
                    <span th:text="${words}"></span>万字
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="xia">
    <div class="bottom-left">
        <div class="zuopin">
            <h3 class="noval-left">我的作品</h3>
        </div>
        <div class="empty" th:onload="|queryAuthorByUid()|">
            <th:block th:if="${author.blist.size()==0}">
                <div class="title">你目前还没有作品<br>快去创建第一本作品吧！</div>
            </th:block>
            <th:block th:if="${author.blist.size()>0}" th:each="b:${author.blist}">
                <ul style="list-style-type:none;">
                    <li>
                        <a href="#">
                            <img th:if="${b.fileInfo==null}" src="../../img/logo.jpg" alt="书籍封面" width="100px;" height="150px;" >
                            <img th:if="${b.fileInfo!=null}" th:src="'../../upload/'+${b.fileInfo.fUrl}" alt="书籍封面"width="100px;" height="150px;" >
                            <a th:text="${b.blName}" style="font-weight: bold;"></a><br><br>
                            <a th:if="${b.blSpeed==1}">连载中</a>
                            <a th:if="${b.blSpeed!=1}">完结</a>
                            <a th:if="${b.blSignstatus==1}">未签约</a>
                            <a th:if="${b.blSignstatus==2}">申请签约中</a>
                            <a th:if="${b.blSignstatus==3}">已签约</a>
                        </a>
                    </li>
                </ul>
            </th:block>
        </div>
    </div>
    <div class="bottom-right">
        <div class="empty">
            <input type="button"  th:onclick="|toAddBookList(${application.user.uId})|" class="btn-primary" value="创建作品">

        </div>
    </div>
</div>
</body>
<script>
    function toAddBookList(uId){
        location.href="/author/toAddBookList?uId="+uId;
    }
</script>
</html>
